package com.whfc.fse.dao;

import com.whfc.fse.dto.FseLiftDataDTO;
import com.whfc.fse.entity.FseLiftData;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FseLiftDataMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(FseLiftData record);

    int insertSelective(FseLiftData record);

    FseLiftData selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(FseLiftData record);

    int updateByPrimaryKey(FseLiftData record);

    List<FseLiftDataDTO> selectByLiftId(@Param("liftId") Integer liftId);

    void updateByLiftIdAndLiftSide(FseLiftData fseLiftData);

    /**
     * 批量插入升降机数据信息
     *
     * @param liftDataList
     */
    void batchInsert(@Param("liftDataList") List<FseLiftData> liftDataList);

    /**
     * 根据升降机ID和升降机方位查找 升降机数据
     *
     * @param liftId   升降机ID
     * @param liftSide 升降机方位
     * @return 升降机数据
     */
    FseLiftData selectByLiftIdAndLiftSide(@Param("liftId") Integer liftId, @Param("liftSide") Integer liftSide);
}